package com.eternal.base.data.source;

import androidx.paging.DataSource;

import com.eternal.base.concat.DeviceModelInfo;
import com.eternal.base.concat.NotificationName;
import com.eternal.base.database.entity.Log;
import com.eternal.base.database.entity.Notification;

import java.util.List;

/**
 * Created by Administrator
 * On 2020/4/24
 * Description:
 *
 * @author Administrator
 */
public interface ILogSource {

    /**
     * @param log
     */
    void addLog(com.eternal.base.database.entity.Log log);

    /**
     * @param mac
     * @param types
     * @param models
     */
    DataSource.Factory<Integer, Log> getLogs(String mac, byte port, List<Byte> types, java.util.List<Byte> models);

    DataSource.Factory<Integer, Log> getLogs(String mac, List<Byte> types);

    /**
     * @param mac
     */
    Log getFirstLog(String mac);

    /**
     * @param mac
     */
    Log getFirstELog(String mac, byte port);

    Log getFirstCLog(String mac);

    /**
     * @param mac
     */
    long getLogTime(String mac, byte port);

    /**
     * @param mac
     * @param time
     */
    void setLogTime(String mac, byte port, long time);

    /**
     * @param mac
     */
    int getNewLogNum(String mac, byte port);

    Notification getNotification(String mac, byte port, int id, byte type);

    DeviceModelInfo getModelInfo(String mac);

    boolean isDegree(String mac);

    List<NotificationName> getNotificationNames(String mac, byte port);

    long getDeviceConnectTime(String mac);
}